package bookstore;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class MapCourse {

	public static void main(String[] args) {
		
		Map<String,Integer> scores = new HashMap<String, Integer>() ;
		Scanner scan = new Scanner(System.in);
		for(int i = 0; i< 5; i++){
			System.out.println("Please input course name:");
			boolean exit = false;
			String name = "";
			while(true) {
				name = scan.nextLine();
				if(!name.trim().equals("")) {
					if (name.equals("exit")) {
						exit = true;

					}
					break;
				}
			}
			if(exit)
				break;

			System.out.println("Please input score of  this course:");
			int score = scan.nextInt();
			scores.put(name, score);
		}


		System.out.println(scores);


	}

}
